<?php

declare(strict_types=1);

namespace Yansongda\Pay\Plugin\sbpay\LinkType;

use Yansongda\Pay\Direction\ResponseDirection;
use Yansongda\Pay\Plugin\Sbpay\GeneralPlugin;
use Yansongda\Pay\Rocket;

use function Yansongda\Pay\generateJapanTime;
/**
 *
 */
class PagePayPlugin extends GeneralPlugin
{
    protected function getUri(Rocket $rocket): string
    {
        return 'Extra/BuyRequestAction.do';
    }

    protected function doSomething(Rocket $rocket): void
    {
        $rocket->setDirection(ResponseDirection::class)
            ->mergePayload([
                'request_date' => generateJapanTime('YmdHis'), //日本时区时间
                'limit_second' => '', //允许请求的最大时间长度
            ])
        ;
    }
}
